<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ page import="java.sql.*,com.dao.*,com.model.*,java.util.*" %>

<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>

</head>
<body>

<div align="center" ;margin-top: 200px;border-style: solid;border-color: black;">
	<a href="/ssh/addmessage.jsp">增加留言</a>
	<table border="0">
		<tr>
			<th>ID</th>
			<th>时间</th>
			<th>评论</th>
			<th>名称</th>
			<th>标题</th>
			<th>功能</th>
		</tr>
		<%
			List<Message> messagelist=(List<Message>)request.getAttribute("messagelist");
			for (Message m : messagelist) {
		%>
		<tr>
			<td><%=m.getId()%></td>
			<td><%=m.getTime()%></td>
			<td><%=m.getContent()%></td>
			<td><%=m.getName()%></td>
			<td><%=m.getTitle()%></td>
			<td><a href="delete2?id=<%=m.getId()%>">删除</a>
			<a href="update?id=<%=m.getId()%>">修改</a></td>
		</tr>
		<%
			}
		%>
	</table>
	</div>
</body>
</html>